<template>
    <div class="PaginationModules">
        <el-pagination 
          background 
          layout="prev, pager, next" 
          :total="pageTotal" 
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"/>
    </div>
</template>
    
<script setup>
import { defineEmits } from 'vue';
defineProps({
  pageTotal:{
    type: Number,
  },
})
// 使用defineEmits创建名称，接受一个数组
const emit = defineEmits(['currentClick'])
const handleSizeChange = (val) => {
  console.log(val,emit, '________')
}
const handleCurrentChange = (val) => {
   //传递给父组件
   emit('currentClick',val)
}
</script>
    
<style scoped lang="scss">
.PaginationModules{

}
</style>